#ifndef SLIEDINDICATOR_H
#define SLIEDINDICATOR_H

#include <QWidget>
#include <QPainter>
class SlideIndicator: public QWidget
{
    Q_OBJECT
public:
    explicit SlideIndicator(QWidget *parent = 0);
    
signals:
    void valueChanged(int v);
public slots:
    void setValue(int v);
protected:
    virtual void paintEvent(QPaintEvent *)
     {
         QPainter painter(this);
         painter.setBrush(Qt::green);
         painter.drawRect(0, 0, width() * m_value / 100, height());
     }
private:
    int m_value;
};

#endif // SLIEDINDICATOR_H
